<?php
//This is where the shit comes
//Prepartion of all images
$home_over = get_image_path() . 'layout/menu/home_over.png';
$career_over = get_image_path() . 'layout/menu/career_over.png';
$course_over = get_image_path() . 'layout/menu/course_over.png';
$institution_over = get_image_path() . 'layout/menu/institution_over.png';
$schedule_over = get_image_path() . 'layout/menu/schedule_over.png';
$manga_over = get_image_path() . 'layout/menu/manga_over.png';
$budget_over = get_image_path() . 'layout/menu/budget_over.png';
$game_over = get_image_path() . 'layout/menu/game_over.png';

$home_up = load_image('layout/menu/home_up.png', array('name' => 'home', 'border' => '0'));
$course_up = load_image('layout/menu/course_up.png', array('name' => 'course'));
$career_up = load_image('layout/menu/career_up.png', array('name' => 'career'));
$institution_up = load_image('layout/menu/institution_up.png', array('name' => 'institution', 'border' => '0'));
$schedule_up = load_image('layout/menu/schedule_up.png', array('name' => 'schedule', 'border' => '0'));
$manga_up = load_image('layout/menu/manga_up.png', array('name' => 'manga', 'border' => '0'));
$budget_up = load_image('layout/menu/budget_up.png', array('name' => 'budget', 'border' => '0'));
$game_up = load_image('layout/menu/game_up.png', array('name' => 'game', 'border' => '0'));

$home_url = base_url() . 'main';
$career_url = base_url() . 'career_selection';
$course_url = base_url() . 'course_selection';
$institution_url = base_url() . 'institution_selection';
$schedule_url = base_url() . 'schedule';
$manga_url = base_url() . 'manga';
$budget_url = base_url() . 'budget_manager';
$game_url = base_url() . 'game';

$banner_arr = array(
    array(
        'name' => 'home',
        'over' => $home_over,
        'up' => $home_up,
        'url' => $home_url
    ),
    array(
        'name' => 'course',
        'over' => $course_over,
        'up' => $course_up,
        'url' => $course_url
    )
    , array(
        'name' => 'career',
        'over' => $career_over,
        'up' => $career_up,
        'url' => $career_url
    ), array(
        'name' => 'institution',
        'over' => $institution_over,
        'up' => $institution_up,
        'url' => $institution_url
    ), array(
        'name' => 'schedule',
        'over' => $schedule_over,
        'up' => $schedule_up,
        'url' => $schedule_url
    ), array(
        'name' => 'manga',
        'over' => $manga_over,
        'up' => $manga_up,
        'url' => $manga_url
    ), array(
        'name' => 'budget',
        'over' => $budget_over,
        'up' => $budget_up,
        'url' => $budget_url
    ), array(
        'name' => 'game',
        'over' => $game_over,
        'up' => $game_up,
        'url' => $game_url
    )
);
?>

<div id="menu">
    <table border="0" cellpadding="0" cellspacing="0">

<?php foreach ($banner_arr as $tab): ?>
            <tr>
                <td>
                    <a href="<?php echo $tab['url']; ?>" onmouseover="MM_nbGroup('over','<?php echo $tab["name"] ?>','<?php echo $tab["over"]; ?>','',1)" onmouseout="MM_nbGroup('out')">
            <?php echo $tab["up"]; ?>
                    </a>
                </td>
            </tr>
                    <?php endforeach; ?>

    </table>      
</div>